using UnityEditor;
using UnityEngine;

namespace LS.GameKit
{
    public class EnumMatrixConfigMenu
    {
        [MenuItem("Lancer Studio/GameKit/EnumMatrixConfig")]
        public static void CreateOrSearchConfigAsset()
        {
            if (EnumMatrixConfig.InstanceObject == null)
            {
                Debug.Log("EnumMatrixConfig asset not found");
                EnumMatrixConfig config = ScriptableObject.CreateInstance<EnumMatrixConfig>();
                ProjectWindowUtil.CreateAsset(config, "Assets/Settings/EnumMatrixConfig.asset");
                AssetDatabase.Refresh();
                EnumMatrixConfig.InstanceObject = config;
                Selection.activeObject = config;
            }
            else
            {
                Selection.activeObject = EnumMatrixConfig.InstanceObject;
            }
        }
    }
}
